// components/detail-song-item/index.js
import {audioStore} from '../../store/audioctx'
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    item: {
      type: Object,
      value: {}
    },
    index: {
      type: Number,
      value: 0
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    goPlay() {
      wx.navigateTo({
        url: `/pages/music-player/index?id=${this.properties.item.id}`,
      })
      audioStore.dispatch('getMusicInfoAction', this.properties.item.id)
    }
  }
})
